import React from 'react'
import ReactDOM from 'react-dom/client' // 正确导入 ReactDOM
import { RouterProvider } from 'react-router-dom' // 从 react-router-dom 导入 RouterProvider
import router from './router'
const rootElement = document.getElementById('root')
if (rootElement) {
  ReactDOM.createRoot(rootElement).render(
    <React.StrictMode>
   <RouterProvider router={router} />
    </React.StrictMode>
  )
} else {
  console.error('Failed to find the root element')
}
